package com.green.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.green.web.util.WebContext;


/**
 * 地图控制类
 * @author Administrator
 *
 */
@Controller
@RequestMapping(value = "/map/*")
public class MapController extends BaseController{
	
	// 百度地图
	@RequestMapping(value = "baiduMap")
	public String baiduMap(ModelMap modelMap) {
		String point = getString("point");
		modelMap.put("point", point);
		modelMap.put("type",  getString("type")); //是否显示公交站 目前默认不显示
		modelMap.put("city", WebContext.getCurrentCity());
		return "Baidumap";
	}

	
	// 百度地图 不带查询条件
	@RequestMapping(value = "baiduMapNo")
	public String baiduMapNo(ModelMap modelMap) {
		String point = getString("point");
		if(point==null || point.equals("0")){
			point="0,0";
		}
		modelMap.put("point", point);
		modelMap.put("type",  getString("type")); //是否显示公交站 目前默认不显示
		modelMap.put("city", WebContext.getCurrentCity());
		return "BaiduMapNo";
	}
}
